home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / dev / amos / AMOSL0495.lzh / AMOSLIST / 000023_amos-request@svcs1.digex.net_Wed Apr 5 20:38:53 1995.msg < prev    next >
Internet Message Format  |  1995-05-01  |  3KB

  1. Received: from svcs1.digex.net by nfs2.digex.net with SMTP id AA11023
  2.   (5.67b8/IDA-1.5); Wed, 5 Apr 1995 20:38:49 -0400
  3. Received: by svcs1.digex.net id AA01778
  4.   (5.67b8/IDA-1.5 for amos-out); Wed, 5 Apr 1995 16:46:53 -0400
  5. Received: from nfs1.digex.net by svcs1.digex.net with SMTP id AA01772
  6.   (5.67b8/IDA-1.5 for <amos@svcs1.digex.net>); Wed, 5 Apr 1995 16:46:51 -0400
  7. Received: from vortex.netbistro.com by nfs1.digex.net with SMTP id AA11701
  8.   (5.67b8/IDA-1.5 for <amos-list@access.digex.net>); Wed, 5 Apr 1995 16:46:45 -0400
  9. Received: by vortex.netbistro.com (Smail3.1.29.1 #11)
  10.     id m0rwbyK-000LTGC; Wed, 5 Apr 95 13:46 WET DST
  11. Date: Wed, 5 Apr 1995 13:46:21 -0700 (PDT)
  12. From: Gau <gau@vortex.netbistro.com>
  13. To: CRSO.Amos@canrem.com
  14. Cc: amos-list@access.digex.net
  15. Subject: Re: stdin/stdout
  16. In-Reply-To: <60.2092.6587.0C1D9EA3@canrem.com>
  17. Message-Id: <Pine.BSD.3.91.950405133029.28440A-100000@vortex.netbistro.com>
  18. Mime-Version: 1.0
  19. Content-Type: TEXT/PLAIN; charset=US-ASCII
  20. Status: O
  21. X-Status: 
  22.  
  23. On Wed, 5 Apr 1995, Mike Pelletier wrote:
  24.  
  25. > Well, yes there are.  And you can't write online games unless you use
  26. > stdin/stdout.  Every language on the planet but amos can be easily ported to
  27. > bbs games because they use the stdin/stdout routinnes for input/output
  28.  
  29. Okay, two ways:
  30.  
  31.     1: Open In 1,"*"
  32.        Open Out 2,"*":rem *** To/From CLI ***
  33.  
  34.     You'd then use something like Input$(1) to get CLI input and
  35.     Print#2,BLAH$ to place output to the CLI.  I've had problems with
  36.     this method since I've had difficulties with bi-direction CLI
  37.     communication.  Maybe someone can get this method to work.
  38.  
  39.     2: <This method is a little trickier but not too difficult>
  40.  
  41.     A$="*"
  42.     Areg(1)=Varptr(A$)
  43.     MYIO=Doscall(LVO("Open"))
  44.  
  45.     Then you use the contents of MYIO and use the following fragments
  46.     to do IO:
  47.  
  48.     IN:
  49.     inbuf$=space$(30)
  50.     areg(1)=MYIO
  51.     areg(2)=Varptr(inbuf$)
  52.     dreg(0)=1
  53.     z=Doscall(LVO("Read"))
  54.  
  55.     OUT:
  56.     outbuf$="Hello world"
  57.     areg(1)=MYIO
  58.     areg(2)=Varptr(outbuf$)
  59.     z=Doscall(LVO("Write"))
  60.  
  61.     Finally, when you are done, you have to close the file:
  62.     areg(1)=MYIO
  63.     z=Doscall(LVO"Close")
  64.     
  65. This might have left out an important detail but most of it is there.  I 
  66. apologize now for any missing info since this mail caught me away from 
  67. my Amiga System Programmers' Handbook.  I think Dreg(0) must be set to 
  68. an access mode for the file in the Open command.  Oh, yeah it does too.  
  69. I don't know the numbers by heart either... drat.  If you have the RKM 
  70. look up "Interactive".  That's the mode you want.
  71.  
  72. This: Dreg(0)=Label("IsInteractive") will probably do it.
  73.  
  74. ========================================================================
  75. Gau of the Veldt
  76.  
  77.   "Draped in monster hides, eyes shining with intelligence.
  78.    A youth surviving against all odds..."
  79.  
  80. =====Internet: gau@vortex.netbistro.com=================================
  81.  
  82.  
  83.